package Day2Zuoye;

public class Test4 {
    public static void main(String[] args) {
        StringBuilder stringBuilder=new StringBuilder();
        System.out.println("stringBuilder");
        long time1=System.nanoTime();
        stringBuilder.append("sss");
        long time2=System.nanoTime();
        System.out.println((time2-time1)+"毫秒");
        StringBuffer stringBuffer=new StringBuffer();
        System.out.println("--------------");
        System.out.println("stringBuffer");
        long time3=System.nanoTime();
        stringBuffer.append("sss");
        long time4=System.nanoTime();
        System.out.println((time4-time3)+"毫秒");

    }
}
